package com.example.myapplication.soaprequest

import com.example.myapplication.soaprequest.request.SoapRequestBody
import com.example.myapplication.soaprequest.response.SoapResponseBody
import org.simpleframework.xml.*


@Root(name = "soap:Envelope")
@NamespaceList(
    Namespace(reference = "http://www.w3.org/2001/XMLSchema-instance", prefix = "xsi"),
    Namespace(reference = "http://www.w3.org/2001/XMLSchema", prefix = "xsd"),
    Namespace(reference = "http://schemas.xmlsoap.org/soap/envelope/", prefix = "soap")
)
class SoapEnvelop {
    @field:ElementUnion(
        // 请求对象
        Element(name = "soap:Body", type = SoapRequestBody::class),
        // 结果对象
        Element(name = "Body", type = SoapResponseBody::class)
    )
    var body: Any? = null
}